xen.git
18 years agohvmloader: Properly implement some more SMBIOS fields.
Keir Fraser [Tue, 1 Apr 2008 16:21:05 +0000 (17:21 +0100)]
hvmloader: Properly implement some more SMBIOS fields.

In particular:
 - BIOS release date
 - BIOS characteristics
 - BIOS extended characteristics (Targeted Content Distribution is
   required to be specified to pass WHQL).
 - CPU speed

Based on a patch by Kamala Narasimhan <kamala.narasimhan@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Support loading Linux bzImage v2.08 and up.
Keir Fraser [Tue, 1 Apr 2008 09:09:33 +0000 (10:09 +0100)]
x86: Support loading Linux bzImage v2.08 and up.

The latest -mm kernel (2.6.25-rc3-mm1) contains v2.08 of the Linux
bzImage format which embeds an ELF file in place of the raw payload
allowing it to be extracted and used by the Xen domain builder.

It is expected that this functionality will be put forward for 2.6.26.

Signed-off-by : Ian Campbell <ijc@hellion.org.uk>

18 years agoxend: XSPolicy.can_run xend support
Keir Fraser [Tue, 1 Apr 2008 09:08:03 +0000 (10:08 +0100)]
xend: XSPolicy.can_run xend support

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agolibxen: XSPolicy.can_run for libxen
Keir Fraser [Tue, 1 Apr 2008 09:07:35 +0000 (10:07 +0100)]
libxen: XSPolicy.can_run for libxen

Add the stub and prototype for the XSPolicy.can_run function to the
lib-xen library. I also fixed some prototypes that had missing
'extern's.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoxen: XSPolicy.can_run hypervisor support
Keir Fraser [Tue, 1 Apr 2008 09:06:58 +0000 (10:06 +0100)]
xen: XSPolicy.can_run hypervisor support

Add functionality for checking whether a domain is in a conflict set
with existing domains.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agodocs: Documentation for XSPolicy.can_run command
Keir Fraser [Tue, 1 Apr 2008 09:05:52 +0000 (10:05 +0100)]
docs: Documentation for XSPolicy.can_run command

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoConstrain the checks for GCC/ANSI to just those header files that
Keir Fraser [Mon, 31 Mar 2008 17:05:18 +0000 (18:05 +0100)]
Constrain the checks for GCC/ANSI to just those header files that
require it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoRevert all usages of gcc's __extension__ keyword, and instead assert
Keir Fraser [Mon, 31 Mar 2008 16:43:18 +0000 (17:43 +0100)]
Revert all usages of gcc's __extension__ keyword, and instead assert
that our headers are not built with __GNUC__ and __STRICT_ANSI__.

__extension__ had some weird (and buggy) behaviours when nested which
make it a risky proposition for general usage in our header
files. Better to disallow -ansi, -std=c99, and similar gcc options
when building against Xen headers.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_64: Initialise upper half of 32-bit parameter registers when
Keir Fraser [Mon, 31 Mar 2008 15:32:33 +0000 (16:32 +0100)]
x86_64: Initialise upper half of 32-bit parameter registers when
making Target Mode BIOS call. Fixes boot problems with some buggy
BIOSes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Remove environment-specific definitions from core
Keir Fraser [Mon, 31 Mar 2008 13:21:13 +0000 (14:21 +0100)]
x86_emulate: Remove environment-specific definitions from core
emulator source files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxend: Improve localtime calculation -- Python time module already
Keir Fraser [Mon, 31 Mar 2008 09:40:43 +0000 (10:40 +0100)]
xend: Improve localtime calculation -- Python time module already
provides the relevant information.

From: Ross Walker <rwalker@medallion.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxm: Make xm's printout of security errors look better
Keir Fraser [Mon, 31 Mar 2008 09:37:19 +0000 (10:37 +0100)]
xm: Make xm's printout of security errors look better

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoioemu: actually check for errors in bdrv_flush et al
Keir Fraser [Mon, 31 Mar 2008 09:35:35 +0000 (10:35 +0100)]
ioemu: actually check for errors in bdrv_flush et al

bdrv_flush is declared to return void, but this is wrong because it
means that the implementations have nowhere to report their errors.
Indeed, the implementations generally ignore errors.

This patch corrects this by making it return int (implicitly, either 0
or -errno, as for other similar functions).  All of the
implementations and callers are adjusted too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agohvm: Allow HVM guests to execute GNTTABOP_setup_table.
Keir Fraser [Fri, 28 Mar 2008 17:58:36 +0000 (17:58 +0000)]
hvm: Allow HVM guests to execute GNTTABOP_setup_table.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoClean up handling of IS_PRIV_FOR() and rcu_[un]lock_domain().
Keir Fraser [Fri, 28 Mar 2008 17:50:10 +0000 (17:50 +0000)]
Clean up handling of IS_PRIV_FOR() and rcu_[un]lock_domain().

In particular this *removes* some IS_PRIV_FOR() checks. *Especially*
in particular, all domctls are executable only by dom0. Several of
them were really unsafe for execution by a stub domain as they can
affect global system resource usage.

This probably breaks stub domains. Where necessary, some of these
reversions can themselves be reverted where they are judged both
necessary and safe.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Code cleanups.
Keir Fraser [Fri, 28 Mar 2008 14:12:33 +0000 (14:12 +0000)]
hvm: Code cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: ne2k buffer full bug fix, by Marcel Block.
Keir Fraser [Fri, 28 Mar 2008 11:17:11 +0000 (11:17 +0000)]
ioemu: ne2k buffer full bug fix, by Marcel Block.

Backport from qemu upstream.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years agoioemu: Fall back to SDL rendering when GLX fails.
Keir Fraser [Fri, 28 Mar 2008 11:15:43 +0000 (11:15 +0000)]
ioemu: Fall back to SDL rendering when GLX fails.

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Perform emulated IDE flushes asynchronously.
Keir Fraser [Fri, 28 Mar 2008 09:50:50 +0000 (09:50 +0000)]
ioemu: Perform emulated IDE flushes asynchronously.

Fixes 'Windows Bug Check 0x101 issue' in which a VCPU gets tied up for
so long doing a synchronous flush to disc that it misses critical
timer events.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Modified-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years agoxend: Fix XendBootloader bogus reference to 'attr'.
Keir Fraser [Fri, 28 Mar 2008 07:34:47 +0000 (07:34 +0000)]
xend: Fix XendBootloader bogus reference to 'attr'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Check I/O port accesses.
Keir Fraser [Thu, 27 Mar 2008 17:25:22 +0000 (17:25 +0000)]
x86_emulate: Check I/O port accesses.
Implements both CPL/IOPL and TSS-bitmap checks.
Requires changes to read/write callback hooks to disable user-access
checks when walking pagetables on behalf of GDT/LDT/TSS accesses.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Two qcow2 bug fixes from upstream qemu.
Keir Fraser [Thu, 27 Mar 2008 17:14:41 +0000 (17:14 +0000)]
ioemu: Two qcow2 bug fixes from upstream qemu.

[Qemu-devel] PATCH: qcow2 image corruption
http://lists.gnu.org/archive/html/qemu-devel/2007-03/msg00773.html

[Qemu-devel] [PATCH] qcow2: release refcount table clusters of the old
table, after growing the refcount table
http://lists.gnu.org/archive/html/qemu-devel/2007-04/msg00043.html

Signed-off-by: Kevin Wolf <kwolf@suse.de>
18 years agotapdisk: Fix L1 table endianess of qcow images
Keir Fraser [Thu, 27 Mar 2008 17:13:37 +0000 (17:13 +0000)]
tapdisk: Fix L1 table endianess of qcow images

Fix tapdisk to use big endian L1 tables as used by qemu/ioemu. Old
tapdisk images with native endianess are automagically converted to
big endian when the image file is opened for the first time.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
18 years agolibfsimage: Build check script needs only /bin/sh.
Keir Fraser [Thu, 27 Mar 2008 16:20:25 +0000 (16:20 +0000)]
libfsimage: Build check script needs only /bin/sh.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agolibfsimage: Revert broken parts of portability changes to the build system.
Keir Fraser [Thu, 27 Mar 2008 15:13:55 +0000 (15:13 +0000)]
libfsimage: Revert broken parts of portability changes to the build system.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoia64 build fix.
Keir Fraser [Thu, 27 Mar 2008 14:43:20 +0000 (14:43 +0000)]
ia64 build fix.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agox86, hvm: MMIO emulations should defer domain shutdown requests until
Keir Fraser [Thu, 27 Mar 2008 11:39:57 +0000 (11:39 +0000)]
x86, hvm: MMIO emulations should defer domain shutdown requests until
the relevant instruction has been fully emulated (which may require
multiple round trips to qemu-dm).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86, vmx: HVM guests are allowed to modify CR2, and the written value
Keir Fraser [Thu, 27 Mar 2008 11:03:45 +0000 (11:03 +0000)]
x86, vmx: HVM guests are allowed to modify CR2, and the written value
should be remembered by Xen.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: On HVM MMIO emulation, cache the gva->pfn mapping for the
Keir Fraser [Thu, 27 Mar 2008 10:52:54 +0000 (10:52 +0000)]
x86_emulate: On HVM MMIO emulation, cache the gva->pfn mapping for the
MMIO page. Speeds up Windows installation by about 20 percent.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoRevert 17296:21d9575c669e.
Keir Fraser [Thu, 27 Mar 2008 09:12:09 +0000 (09:12 +0000)]
Revert 17296:21d9575c669e.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Clean up HVM emulated I/O handling.
Keir Fraser [Wed, 26 Mar 2008 19:00:57 +0000 (19:00 +0000)]
x86_emulate: Clean up HVM emulated I/O handling.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: HVM emulation of REP instructions should inject #PF only
Keir Fraser [Wed, 26 Mar 2008 15:50:45 +0000 (15:50 +0000)]
x86_emulate: HVM emulation of REP instructions should inject #PF only
if virt-to-phys lookup fails for the first repetition.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Fix L1 table endianess of qcow images created by tapdisk
Keir Fraser [Wed, 26 Mar 2008 14:44:21 +0000 (14:44 +0000)]
ioemu: Fix L1 table endianess of qcow images created by tapdisk

The qemu/ioemu implementation of the qcow format uses a big endian L1
table. tapdisk omits the necessary conversion, so qcow images have the
wrong endianess and cannot be read by correct implementations of qcow.

This patch detects broken tapdisk images and converts their L1 tables
to big endian when the image file is opened in ioemu for the first
time. The fixed image has a new flag EXTHDR_L1_BIG_ENDIAN set in the
extended header.

Note that a converted image cannot be opened by tapdisk again.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
18 years agopygrub: cleanup and support for NetBSD
Keir Fraser [Wed, 26 Mar 2008 14:41:47 +0000 (14:41 +0000)]
pygrub: cleanup and support for NetBSD

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years agolibfsimage: portability fixes for NetBSD
Keir Fraser [Wed, 26 Mar 2008 14:40:54 +0000 (14:40 +0000)]
libfsimage: portability fixes for NetBSD

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years agopvfb: Add offset in resize event
Keir Fraser [Wed, 26 Mar 2008 14:05:36 +0000 (14:05 +0000)]
pvfb: Add offset in resize event
Also support depth change.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agomini-os: Fix build error.
Keir Fraser [Wed, 26 Mar 2008 14:04:21 +0000 (14:04 +0000)]
mini-os: Fix build error.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years agoxenstored: Delay forking until after listening sockets are
Keir Fraser [Wed, 26 Mar 2008 13:21:42 +0000 (13:21 +0000)]
xenstored: Delay forking until after listening sockets are
opened. Also, in startup xend script, delay further startup until
xenstored initial child process has exited. This serialises xenstored
startup with that of other daemons (e.g., xenconsoled).

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agoioemu: save IDE write cache flag.
Keir Fraser [Wed, 26 Mar 2008 13:15:33 +0000 (13:15 +0000)]
ioemu: save IDE write cache flag.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: blkfront_aio_poll may reenter
Keir Fraser [Wed, 26 Mar 2008 13:15:00 +0000 (13:15 +0000)]
minios: blkfront_aio_poll may reenter
if the callback calls blkfront_sync for instance.
In such a case, we would see responses and hence release grants
several times. We need to be more synchronous and stop when we detect
that we have re-entered.
This fixes HVM restore with stubdomains.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: more assertions
Keir Fraser [Wed, 26 Mar 2008 13:13:50 +0000 (13:13 +0000)]
minios: more assertions
- assert that we never allocate or free the same grant twice
- assert that network packets do not exceed a page
- assert that incoming network event IDs make sense

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agohvm: Correctly combine hardware exceptions when one is raised during
Keir Fraser [Wed, 26 Mar 2008 11:04:06 +0000 (11:04 +0000)]
hvm: Correctly combine hardware exceptions when one is raised during
attempted delivery of another.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoExplicitly tag every anonymous aggregate in the public headers.
Keir Fraser [Wed, 26 Mar 2008 10:14:50 +0000 (10:14 +0000)]
Explicitly tag every anonymous aggregate in the public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoAPI Changelog entry for xenfb dynamic resolution.
Keir Fraser [Wed, 26 Mar 2008 09:12:57 +0000 (09:12 +0000)]
API Changelog entry for xenfb dynamic resolution.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxenfb: Dynamic modes support.
Keir Fraser [Wed, 26 Mar 2008 09:09:16 +0000 (09:09 +0000)]
xenfb: Dynamic modes support.

Attached patch adds dynamic frame buffer size support to the xenfb PV
backend QEMU xenfb.  Backend sets feature-resize and handles the
resize frame buffer event.

Corresponding frontend LINUX patch is required for functionality but
this patch is not dependent on it, preserving backwards
compatibility.

Signed-off-by: Pat Campbell <plc@novell.com>
18 years agoPrefix unnamed union structure fields with __extension__ to make it
Keir Fraser [Tue, 25 Mar 2008 18:02:00 +0000 (18:02 +0000)]
Prefix unnamed union structure fields with __extension__ to make it
work properly even in e.g. C99 standard mode.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agostubdom: remove unnecessary include
Keir Fraser [Tue, 25 Mar 2008 17:56:49 +0000 (17:56 +0000)]
stubdom: remove unnecessary include

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agomini-os: free dropped lwip packets
Keir Fraser [Tue, 25 Mar 2008 17:56:09 +0000 (17:56 +0000)]
mini-os: free dropped lwip packets
When lwIP can not accept a packet, it is up to us to free it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agostubdom: fix x86_64 irq stack size
Keir Fraser [Tue, 25 Mar 2008 17:55:39 +0000 (17:55 +0000)]
stubdom: fix x86_64 irq stack size
by making it use STACK_SIZE like other places.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agohvm acpi: Restrict to 15 Processor objects.
Keir Fraser [Tue, 25 Mar 2008 10:57:50 +0000 (10:57 +0000)]
hvm acpi: Restrict to 15 Processor objects.

Some versions of Windows 2000 only support no more than 15 cpus in
ACPI table, otherwise it will cause a BSOD
KMODE_EXCEPTION_NOT_HANDLED. This patch decrease the cpu count in the
ACPI DSDT to 15.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
At the same time, fix the ACPI processor IDs in the Processor objects.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxend: typo
Keir Fraser [Tue, 25 Mar 2008 10:26:05 +0000 (10:26 +0000)]
xend: typo

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoioemu: prefix phy devices with /dev/
Keir Fraser [Tue, 25 Mar 2008 10:24:45 +0000 (10:24 +0000)]
ioemu: prefix phy devices with /dev/
just like blkif.py's _parse_uname does for PV guests.  Closes bug #983.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoioemu: fix VNC case when switching from 32bpp to 24bpp
Keir Fraser [Tue, 25 Mar 2008 10:24:26 +0000 (10:24 +0000)]
ioemu: fix VNC case when switching from 32bpp to 24bpp
Even if we don't need to tell the client to redepth, we need to tell
e.g. xenfb that we can't share the buffer any more.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoTrivial build cleanup.
Keir Fraser [Tue, 25 Mar 2008 10:23:29 +0000 (10:23 +0000)]
Trivial build cleanup.

xenapi.out needs to be ignored and removed on clean;
tools/ioemu/i386-dm/Makefile is a soft link and should be ignored.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agotools build: Fix build after subdir rules cleanups.
Keir Fraser [Tue, 25 Mar 2008 10:17:22 +0000 (10:17 +0000)]
tools build: Fix build after subdir rules cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agotools/firmware: Use generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:51:03 +0000 (09:51 +0000)]
tools/firmware: Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agotools/libfsimage build: Use generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:50:45 +0000 (09:50 +0000)]
tools/libfsimage build: Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agotools/blktap: Use generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:50:27 +0000 (09:50 +0000)]
tools/blktap: Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agotools/flask build: Use generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:50:11 +0000 (09:50 +0000)]
tools/flask build: Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agotools/vtpm_manager build: Use generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:49:49 +0000 (09:49 +0000)]
tools/vtpm_manager build: Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agotools/vtpm_manager build: Cleanup makefiles.
Keir Fraser [Tue, 25 Mar 2008 09:49:27 +0000 (09:49 +0000)]
tools/vtpm_manager build: Cleanup makefiles.

Remove unnecessary openssl check. Use VPATH. Make clean remove all
generated files.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agotools/xenstat build: Use generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:49:03 +0000 (09:49 +0000)]
tools/xenstat build: Use generic subdirs rules.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agobuild: Add generic subdirs rules.
Keir Fraser [Tue, 25 Mar 2008 09:48:41 +0000 (09:48 +0000)]
build: Add generic subdirs rules.

Use them in the toplevel Makefile.

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years agovmx: Setting of VMCS IO_BITMAP_B must take account of fact that
Keir Fraser [Fri, 21 Mar 2008 09:45:34 +0000 (09:45 +0000)]
vmx: Setting of VMCS IO_BITMAP_B must take account of fact that
hvm_io_bitmap is now a long[] rather than a char[].

Bug spotted by Dexuan Cui <dexuan.cui@intel.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Fix vnc buffer sharing when linesize != width * depth.
Keir Fraser [Thu, 20 Mar 2008 18:28:52 +0000 (18:28 +0000)]
ioemu: Fix vnc buffer sharing when linesize != width * depth.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
18 years agominios: get VBD CD/removable/RO info
Keir Fraser [Thu, 20 Mar 2008 17:48:02 +0000 (17:48 +0000)]
minios: get VBD CD/removable/RO info

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoioemu: improve DMA transfers
Keir Fraser [Thu, 20 Mar 2008 17:47:33 +0000 (17:47 +0000)]
ioemu: improve DMA transfers
by increasing the size of DMA buffers.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoioemu: IDE should accept SETMULT 0
Keir Fraser [Thu, 20 Mar 2008 17:47:05 +0000 (17:47 +0000)]
ioemu: IDE should accept SETMULT 0
as upstream qemu now does

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoxend: Fix writing domain's VDI UUID into domain state file.
Keir Fraser [Thu, 20 Mar 2008 17:45:00 +0000 (17:45 +0000)]
xend: Fix writing domain's VDI UUID into domain state file.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Allow VNC buffer sharing when linesize != width * depth
Keir Fraser [Thu, 20 Mar 2008 10:48:21 +0000 (10:48 +0000)]
ioemu: Allow VNC buffer sharing when linesize != width * depth

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
18 years agoioemu: Fix non-openGL resize
Keir Fraser [Thu, 20 Mar 2008 10:47:17 +0000 (10:47 +0000)]
ioemu: Fix non-openGL resize
We can not resize when OpenGL is not enabled.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoioemu: Initialize ioport_opaque, ioport_read/write_table to zero
Keir Fraser [Thu, 20 Mar 2008 10:46:52 +0000 (10:46 +0000)]
ioemu: Initialize ioport_opaque, ioport_read/write_table to zero

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agostubdom: add C example target
Keir Fraser [Wed, 19 Mar 2008 16:21:39 +0000 (16:21 +0000)]
stubdom: add C example target

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agostubdom: fix compilation
Keir Fraser [Wed, 19 Mar 2008 16:21:01 +0000 (16:21 +0000)]
stubdom: fix compilation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: update README
Keir Fraser [Wed, 19 Mar 2008 16:20:44 +0000 (16:20 +0000)]
minios: update README

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Automatically set IP from XenStore information
Keir Fraser [Wed, 19 Mar 2008 16:20:14 +0000 (16:20 +0000)]
minios: Automatically set IP from XenStore information

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoblktap: Fix BSD build failure.
Keir Fraser [Wed, 19 Mar 2008 16:19:10 +0000 (16:19 +0000)]
blktap: Fix BSD build failure.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years agoAMD IOMMU: Fix up coding style issue in amd iommu files
Keir Fraser [Wed, 19 Mar 2008 16:16:24 +0000 (16:16 +0000)]
AMD IOMMU: Fix up coding style issue in amd iommu files
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: fix sdl opengl rendering
Keir Fraser [Wed, 19 Mar 2008 14:13:17 +0000 (14:13 +0000)]
ioemu: fix sdl opengl rendering
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
18 years agotapaio build fix
Keir Fraser [Wed, 19 Mar 2008 14:12:12 +0000 (14:12 +0000)]
tapaio build fix

With some combinations of compiler flags (no optimization, -Werror),
the compiler may complain that the function doesn't have a return
statement (even if the function actually just never returns), reported
as bug 1128. This adds a dummy return statement.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoacpi: hwregs.c only needed on x86.
Keir Fraser [Wed, 19 Mar 2008 14:11:22 +0000 (14:11 +0000)]
acpi: hwregs.c only needed on x86.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Remove the CPL and IOPL check in the I/O handling code.
Keir Fraser [Wed, 19 Mar 2008 14:08:02 +0000 (14:08 +0000)]
x86_emulate: Remove the CPL and IOPL check in the I/O handling code.

The check is already carried out by the processor during VMEXIT, where
that is required.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
18 years agox86_emulate: Return X86EMUL_UNHANDLEABLE if mode_iopl() or
Keir Fraser [Wed, 19 Mar 2008 14:06:18 +0000 (14:06 +0000)]
x86_emulate: Return X86EMUL_UNHANDLEABLE if mode_iopl() or
mode_ring0() checks cannot be carried out.
Also fix handling of EFLAGS.IF in iret and popf.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agolibxc: Remove permute() function from xc_domain_save().
Keir Fraser [Wed, 19 Mar 2008 12:41:48 +0000 (12:41 +0000)]
libxc: Remove permute() function from xc_domain_save().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86 ACPI sleep: Fix a bug when ACPI registers in System_Memory
Keir Fraser [Wed, 19 Mar 2008 10:33:13 +0000 (10:33 +0000)]
x86 ACPI sleep: Fix a bug when ACPI registers in System_Memory

Some ACPI registers may be in System_Memory but not System_IO space,
For these machines S3 fails since current Xen use I/O instructions (e.g.
inb(), outb(), etc.) to access ACPI registers. The patch attached fix
the bug by adding GAS (generic address structure) support ported from
Linux, which should also benefit later ACPI activity within Xen.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
18 years agoIntel VTD: Ignore USB RMRR for HVM guest
Keir Fraser [Wed, 19 Mar 2008 10:22:49 +0000 (10:22 +0000)]
Intel VTD: Ignore USB RMRR for HVM guest

USB controller RMRR (0xed000 - 0xeffff) conflicts with HVM guest bios
region. Setting identity mapping for it will cover the guest bios
region in p2m table. This causes system crash.

As VT-d spec says, USB controller RMRR is used in case of DMA
performed by a USB controller under BIOS SMM control for legacy
keyboard emulation. Whereas, current guest BIOS doesn't support
emulating stardand Keyboard/mouse, and it also doesn't support SMM
mode. Actually it is no chance to use USB controller RMRR now.

This patch ignores the USB controller RMRR for HVM guest.

Signed-off-by: Weidong Han <weidong.han@intel.com>
18 years agotools: More accurate parsing of pci config.
Keir Fraser [Wed, 19 Mar 2008 10:21:01 +0000 (10:21 +0000)]
tools: More accurate parsing of pci config.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
18 years agoxend: Fix and improve default NUMA node selection.
Keir Fraser [Wed, 19 Mar 2008 10:20:17 +0000 (10:20 +0000)]
xend: Fix and improve default NUMA node selection.

Add the missing condition check and use average value instead of the
sum value of Vcpus pinning cpus on certain node to choose relaxed node.

Signed-off-by: Duan Ronghui <ronghui.duan@intel.com>
18 years agoFix methods in SrvDomain class for inactive managed domains
Keir Fraser [Wed, 19 Mar 2008 10:18:36 +0000 (10:18 +0000)]
Fix methods in SrvDomain class for inactive managed domains

This patch fixes methods in SrvDomain class for inactive managed
domains.  They should use a domain name because inactive managed
domains don't have a domID.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agox86: Avoid dereference of 'struct page_info' for invalid MFNs.
Keir Fraser [Wed, 19 Mar 2008 10:15:01 +0000 (10:15 +0000)]
x86: Avoid dereference of 'struct page_info' for invalid MFNs.
Introduced by my changes to Samuel's transitive-privilege patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: Improve SDL openGL configure-script detection.
Keir Fraser [Wed, 19 Mar 2008 00:01:25 +0000 (00:01 +0000)]
ioemu: Improve SDL openGL configure-script detection.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoia64: Fix ACPI header inclusion into libxc.
Keir Fraser [Tue, 18 Mar 2008 21:05:47 +0000 (21:05 +0000)]
ia64: Fix ACPI header inclusion into libxc.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agosave/restore: Permute saved memory with 2MB chunk size.
Keir Fraser [Tue, 18 Mar 2008 19:36:43 +0000 (19:36 +0000)]
save/restore: Permute saved memory with 2MB chunk size.

The memory permutation cause a slow down in case of a save/restore
(bug 1143). It works better when the mixing is done with 2MB chunks.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
18 years agoia64: Fix build after ACPI header churn.
Keir Fraser [Tue, 18 Mar 2008 19:28:09 +0000 (19:28 +0000)]
ia64: Fix build after ACPI header churn.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: stub domains and page ownership for mapping in dom0
Keir Fraser [Tue, 18 Mar 2008 16:15:24 +0000 (16:15 +0000)]
x86: stub domains and page ownership for mapping in dom0

In the case of an ioemu stubdomain with SDL or vnc server running in
dom0, we want to have the stubdomain expose the HVM guest's video RAM
through PVFB.

However, to map the pages from dom0, xenfb uses xc_map_foreign_pages
with the stubdomain ID as domid (since that is what is advertised in
the PVFB protocol, and needed for other parts of the protocol), and
thus get_page_from_l1e() complains because the stubdomain is not the
owner of the pages.  In such case, this patch checks that the
stubdomain has privileges on the actual owner of the pages, and then
accept the mapping.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agox86: fix feature availability for PV guests
Keir Fraser [Tue, 18 Mar 2008 16:05:24 +0000 (16:05 +0000)]
x86: fix feature availability for PV guests

PV guests should not be allowed to believe features not currently
virtualized (in many cases, requiring special MSRs) are available. Of
course it is bad enough that to work on older hypervisors guests will
still need to special case this, but better fix it now than never.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: check ModR/M mod bits for CR/DR access insns
Keir Fraser [Tue, 18 Mar 2008 16:02:36 +0000 (16:02 +0000)]
x86: check ModR/M mod bits for CR/DR access insns

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovfb: Add opengl option
Keir Fraser [Tue, 18 Mar 2008 15:51:19 +0000 (15:51 +0000)]
vfb: Add opengl option

(and replace bogus vncpasswd copy in xenapi_create in the SDL case)

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agosvm: Reported SS.DPL must equal CPL, as this is assumed by generic HVM
Keir Fraser [Tue, 18 Mar 2008 15:26:35 +0000 (15:26 +0000)]
svm: Reported SS.DPL must equal CPL, as this is assumed by generic HVM
code despite the fact that AMD processors do not always maintain this
invariant.

Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agodomain_shutdown() needs to vcpu_pause_nosync() rather than directly
Keir Fraser [Tue, 18 Mar 2008 15:23:25 +0000 (15:23 +0000)]
domain_shutdown() needs to vcpu_pause_nosync() rather than directly
incrementing the pause_count field. The latter ensures that the VCPU
gets descheduled --- synchronously in the case of the
currently-running VCPU.

Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>